package com.voicenews.activity;

/**
 * @author Paresh N. Mayani
 * http://www.technotalkative.com
 */

import com.voicenews.R;
import com.voicenews.gcm.PushArticlesRegister;
import com.voicenews.playtts.ShowExtractedArticle;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

public class HomeActivity extends DashBoardActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dashboard);
        setHeader(getString(R.string.HomeActivityTitle),false, false, false, false);
    }
    
    /**
     * Button click handler on home activity
     * @param v
     */
    public void onButtonClicker(View v)
    {
    	Intent intent;
    	switch (v.getId()) {
		case R.id.tin_tong_hop_button:
			intent = new Intent(this, ArticleCategoryActivity.class);
			startActivity(intent);
			break;
		case R.id.tin_goi_y_button:
			intent = new Intent(this, RecommendArticlesActivity.class);
			startActivity(intent);
			break;
		case R.id.tim_kiem_theo_tag_button:
			intent = new Intent(this, SearchArticlesByTagActivity.class);
			startActivity(intent);
			break;
		case R.id.tin_tu_dong_button:
			intent = new Intent(this, PushArticlesRegister.class);
			startActivity(intent);
			break;
		case R.id.tin_tuyen_dung_button:
			Intent i1 = new Intent(getApplicationContext(), RecruitmentCategoryActivity.class);
			startActivity(i1);
			break;
			
		case R.id.tin_tieng_anh_button:
//			intent = new Intent(this, Activity_JellyBean.class);
//			startActivity(intent);
			break;	
		default:
			break;
		}
    }

	@Override
	protected void onDestroy() {
		super.onDestroy();
		System.out.println("ondestroy home");
	}

	@Override
	protected void onPause() {
		super.onPause();
		System.out.println("onpause home");
	}
}

